/*
 * 四川生学教育科技有限公司
 * Copyright (c) 2015-2025 Founder Ltd. All Rights Reserved.
 *
 * This software is the confidential and proprietary information of
 * Founder. You shall not disclose such Confidential Information
 * and shall use it only in accordance with the terms of the agreements
 * you entered into with Founder.
 *
 */
package com.example.demo.domain;

/**
 * @author JiuHu.XIONG (xjh@sxw.cn)
 * @description TODO
 * @date 2018/9/26 17:45
 * @since 1.0.0
 */
public class Person {

    private String name;
    private int idCard;

    public Person(int idCard, String name) {
        this.idCard = idCard;
        this.name = name;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()){
            return false;
        }
        Person person = (Person) obj;
        //两个对象是否等值，通过idCard来确定
        return this.idCard == person.idCard;    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIdCard() {
        return idCard;
    }

    public void setIdCard(int idCard) {
        this.idCard = idCard;
    }
}
